Skip to contentSkip to conversation

EBC peripheral, access causing Machine Check

DISCUSSION Dave Cogley 2 participants 3 messages Sep 24, 2007 – Sep 25, 2007

lore
Share & tools
lore
#0 lore raw

Good Afternoon,

I am using an AMCC 440EPx processor with an FPGA peripheral attached to the EBC. I am doing the entire bank configuration in the u-boot boot loader before Linux is loaded. I can directly read and write registers using memory read and write (md, nm) within area 0xC0000000 to 0xC000FFFF direct memory I/O within the context of u-boot without any faults. When I attempt to access any register in area 0xC000000 within the context of my Linux device driver I get a Machine Check fault (attached text) which appears to be an access permission violation. I am currently running the DENX ELDK 2.6.19.2 platform that was specific to the "Sequoia" platform.

I have configured the EBC access permissions and control resisters as follows for bank 1:

PB1CR: 0xC003C000

PB1AP: 0x80040380

Dave Cogley

Software Engineer

Ultra Stereo Labs, Inc.

(805) 549-0161

mailto:[email protected]

bash-3.00#

Machine check in kernel mode.
Data Read PLB Error
OPB to PLB3: BSTAT= 0x00000000
PLB3 to PLB4: BEAR=0xffffffffffffffff BESR0=0x00000000 BESR1=0x00000000 PLB4 to PLB3: BEAR=0xfffffffffffffffd BESR0=0x00000000 BESR1=0x00000000 PLB3 to OPB: BEAR=0xffffffff BESR0=0x00000000 BESR1=0x00000000 PLB3 arbiter: BEAR=0xfffffffe ACR=0x00000000 BESR=0x00000000 PLB4 to OPB1: BEAR=0x0000000dbfffffbf BESR0=0x00000000 BESR1=0x00000000 PLB40 Arbiter: BEAR=0x00000000c0000000 ACR=0xda000000 BESR0=0x0f000000 PLB41 Arbiter: BEAR=0xfffffffffffffffc ACR=0xdb000000 BESR0=0x00000000
POB0: BEAR=0xc27e3194ffffffff BESR0=0x00000000 BESR1=0x00000000
OPB0: BEAR=0x0000000000000000 BSTAT=0x00000000

Oops: machine check, sig: 7 [#2]
NIP: D107E2D4 LR: C0069F24 CTR: 0FF40B20
REGS: c02a9f50 TRAP: 0202   Not tainted  (2.6.19.2)
MSR: 00029000 <EE,ME>  CR: 40000022  XER: 00000000

TASK = cf6c1030[268] 'banjocore' THREAD: cf1b8000
GPR00: 40044B01 CF1B9EB0 CF6C1030 00000000 CF0EF5C0 40044B01 7F95B928 0FF39D08
GPR08: 00000000 00000000 FFFFFFE7 D1080000 80000028 10018B10 00000000 100D8ED8
GPR16: 100C0000 00000000 100C0000 10090000 00000000 100DF660 100C7C48 00000000
GPR24: 100D9038 00000000 100D8F58 40044B01 FFFFFFF7 CF0EF5C0 0FFBB73C 7F95B928 NIP [D107E2D4] banjo_ioctl+0xc0/0x14c [banjodecoder]
LR [C0069F24] do_ioctl+0x80/0x84

Call Trace:

[CF1B9EB0] [00000001] 0x1 (unreliable)
[CF1B9ED0] [C0069F24] do_ioctl+0x80/0x84
[CF1B9EE0] [C0069FB4] vfs_ioctl+0x8c/0x418
[CF1B9F10] [C006A380] sys_ioctl+0x40/0x74
[CF1B9F40] [C0001C84] ret_from_syscall+0x0/0x3c
Instruction dump:
60004b00 7f850000 419e0044 3c004004 60004b01 7f850000 38600000 409eff74 3d60d108 812bf2a4 7c0004ac 7d204c2c <0c090000> 4c00012c 38600000 91260000 Bus error
bash-3.00#

#1 lore raw
Quoted 16 lines · On Mon, 24 Sep 2007 12:19:01 -0700 "Dave Cogley" <[email protected]> wrote:

Good Afternoon,

I am using an AMCC 440EPx processor with an FPGA peripheral attached to the EBC. I am doing the entire bank configuration in the u-boot boot loader before Linux is loaded. I can directly read and write registers using memory read and write (md, nm) within area 0xC0000000 to 0xC000FFFF direct memory I/O within the context of u-boot without any faults. When I attempt to access any register in area 0xC000000 within the context of my Linux device driver I get a Machine Check fault (attached text) which appears to be an access permission violation. I am currently running the DENX ELDK 2.6.19.2 platform that was specific to the "Sequoia" platform.

Quoted 8 lines

I have configured the EBC access permissions and control resisters as follows for bank 1:

PB1CR: 0xC003C000

PB1AP: 0x80040380

You need proper TLB entries set up before you can access things. Linux discards the MMU settings that U-Boot does. So your driver needs to call ioremap on the physical address.

Other than that, we can't help you much without your driver code.

josh

#2 lore raw

Yes I thought it might be a problem with the TLB. Where does the TLB initialization take place in the Linux kernel? I am able to access any other peripherals on the chip as there TLB entries appear to be properly allocated. I am remapping the physical address for all peripherals that I am working with. I have attached the driver code for reference.

Dave

-----Original Message-----
From: Josh Boyer [mailto:[email protected]]
Sent: Monday, September 24, 2007 4:42 PM
To: Dave Cogley
Cc: [email protected]
Subject: Re: EBC peripheral, access causing Machine Check

Quoted 5 lines · On Mon, 24 Sep 2007 12:19:01 -0700 "Dave Cogley" <[email protected]> wrote:

Good Afternoon,

I am using an AMCC 440EPx processor with an FPGA peripheral attached to

the

Quoted 4 lines

EBC. I am doing the entire bank configuration in the u-boot boot loader before Linux is loaded. I can directly read and write registers using memory read and write (md, nm) within area 0xC0000000 to 0xC000FFFF direct memory I/O within the context of u-boot without any faults. When I

attempt

Quoted 7 lines

to access any register in area 0xC000000 within the context of my Linux device driver I get a Machine Check fault (attached text) which appears to be an access permission violation. I am currently running the DENX ELDK 2.6.19.2 platform that was specific to the "Sequoia" platform.

Quoted 8 lines

I have configured the EBC access permissions and control resisters as follows for bank 1:

PB1CR: 0xC003C000

PB1AP: 0x80040380

You need proper TLB entries set up before you can access things. Linux discards the MMU settings that U-Boot does. So your driver needs to call ioremap on the physical address.

Other than that, we can't help you much without your driver code.

josh